﻿using Hong.IRepository.IRepository_SystemSettings;
using Hong.Model.Dto.PesponseDto.ResponseModel.ResultModel;
using Hong.Model.SysDomain.Model_SystemSettings;
using Hong.Model.SysDomain.Model_SystemSettings.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hong.Business.Business_SystemSettings
{
    public  class Institutionalsetting
    {
        #region 构造器业务注入

        private readonly IDepartmentDal _departmentDal;

        public Institutionalsetting(IDepartmentDal departmentDal)
        {
            _departmentDal = departmentDal;
        }

        #endregion

        #region 部门管理

        #region 加载部门(分页/模糊查询)
        public async Task<PageResponse<Dep_DicModel>> GetDep(string DepName, int pageindex, int pagesize)
        {
            return await _departmentDal.GetDep(DepName, pageindex, pagesize);
        }
        #endregion

        #region 添加部门
        public async Task<ResponseModel<bool>> AddDep(Department department)
        { 
            return await _departmentDal.AddDep(department);
        }
        #endregion

        #region 加载部门下拉列表
        public async Task<ResponseModel<List<Department>>> selecDep()
        {
            return await _departmentDal.selecDep();
        }
        #endregion

        #region 公共查询字典表
        public async Task<ResponseModel<List<Dictionary>>> selecDic(string DicCode)
        {
            return await _departmentDal.selecDic(DicCode);         
        }
        #endregion

        #endregion



    }
}
